define([ "app", "jquery", "md5", "ecb", 
		 "services/MessageBox",
		 "resources/DataSynchResource"
		],
		function(app) {

	var deps = [ "$scope", "$state", "$window",  "$location","$stateParams", "MessageBox","DataSynchResource"];

	function controller($scope, $state, $window, $location, $stateParams, MessageBox,DataSynchResource) {
		
		/**
		 * 数据同步
		 */
		$scope.dataSynch =function (){
			DataSynchResource.dataSynch().success(function(data){
        		var result =data.result;
        		if(result=="success"){
        			alert("同步成功!");
        		}
            });
		}
    };
	
	controller.$inject = deps;
	return app.lazy.controller("DataSynchController", controller);
});
